<html>
<head><meta charset="utf-8"><title>Running a specific ui test takes a long time · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html">Running a specific ui test takes a long time</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="242473530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242473530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noble Mushtak (he/him) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242473530">(Jun 12 2021 at 21:30)</a>:</h4>
<p>Hi, everyone. I am very new to open source and I wanted to play around with the Rust compiler to see what it was like. I built the project and then tried to run a single test: <code>./x.py test src/test/ui/absolute-paths-in-nested-use-groups.rs --incremental</code></p>
<p>However, even running this single ui test took almost 3 minutes. Is there a faster/more efficient way to run tests if I just want to run one test? I would appreciate any help, thanks.</p>



<a name="242473621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242473621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242473621">(Jun 12 2021 at 21:31)</a>:</h4>
<p>that seems curious, for me that command runs in two seconds</p>



<a name="242473675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242473675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242473675">(Jun 12 2021 at 21:32)</a>:</h4>
<p>what code have you edited locally? the compiler, the stdlib, or just the test?</p>



<a name="242473832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242473832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noble Mushtak (he/him) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242473832">(Jun 12 2021 at 21:37)</a>:</h4>
<p>I haven't edited any code locally. I just cloned the rust-lang/rust repo, ran <code>./x.py build</code> and then ran <code>./x.py test src/test/ui/absolute-paths-in-nested-use-groups.rs --incremental</code>. However, I just ran it again and it took only 37 seconds and then I ran it again and it only took 4 seconds. I guess I just had to run it a few times for it to take only a few seconds.</p>



<a name="242473910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242473910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Yu [they/she] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242473910">(Jun 12 2021 at 21:39)</a>:</h4>
<p>i think you need to consistently use <code>--incremental</code> across different commands for it to properly minimize recompilation</p>



<a name="242473960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242473960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242473960">(Jun 12 2021 at 21:40)</a>:</h4>
<p>rather than needing to pass --incremental to your commands, you can configure incremental to be on in your config.toml, as shown in the dev guide at <a href="https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#create-a-configtoml">https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#create-a-configtoml</a></p>



<a name="242474627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242474627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242474627">(Jun 12 2021 at 21:52)</a>:</h4>
<p>btw if it was the first time you ran a test, the test framework was also built automatically</p>



<a name="242474653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242474653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242474653">(Jun 12 2021 at 21:53)</a>:</h4>
<p>(and if you're re-running a test without modification to the compiler or the test, then it should be ignored by the test runner)</p>



<a name="242475434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20specific%20ui%20test%20takes%20a%20long%20time/near/242475434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20specific.20ui.20test.20takes.20a.20long.20time.html#242475434">(Jun 12 2021 at 22:14)</a>:</h4>
<p>yeah, going through the entirety of bootstrap and the test framework in 3 minutes is pretty good.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>